The properties of X-ray clusters of galaxies can be well understood in terms of a competition between shock heating and adiabatic compression. Strong shocks are expected to be important for massive clusters, while adiabatic compression is dominant for small clusters and groups. The scale of the shock/adiabatic transition is marked by a change of slope of the L-T relation and in the global properties of the emitting plasma. This scale is connected to star formation processes. Two quantities are crucial: the average energy injected in the IGM from stars and SNe, and the epoch of the energy injection. We show how these quantities can be synthesized in terms of specific entropy, which ultimately determines the X-ray emission from groups and clusters.